import request from 'umi-request';


export async function addRule(params) {
    return request('/api/rule', {
      method: 'POST',
      data: { ...params, method: 'post' },
    });
  }
  export async function addFakeList(params) {
    console.log(params)
    return request('/admin/create', {
      method: 'POST',
      data: params,
      requestType:"json"
    });
  }
  export async function queryFakeList(params) {
    params ={type200:1,...params}
    return request('/admin/list', {
       params,
     
    });
  }
  export async function searchstuList(params) {
    params ={type200:1,...params}
    return request('/admin/searchClass', { 
      params
    });
  }
  export async function removeFakeList(params) {
    return request('/admin/del', {
      method: 'POST',
      params
    });
  }

  export async function updateFakeList(params) {
    return request('/admin/update', {
      method: 'post',
      data: {...params},
    });
  }
  export async function changestatus(params) {
    return request('/admin/updateStatus', {
      method: 'POST',
      params
    });
  }

  export async function resetPassword(params) {
    return request('/admin/resetPassword', {
      method: 'POST',
      params
    });
  }
  export async function importExcel(params) {
    return request('/admin/importExcel', {
      method: 'POST',
      data: params,
      requestType: 'form',
    });
  }

  export async function getCurrent(params) {
    params ={type200:1,...params}
    return request('/admin/getResult', {
      params,
    });
  }
  
  export async function getexam(params) {
    params ={type200:1,...params}
    return request('/admin/get', {
      params,
    });
  }
  export async function updateAnswer(params) {
    return request('/admin/updateResultAnswer', {
      method: 'POST',
      params,
    });
  }
  export async function updateComment(params) {
    return request('/admin/updateTeacherComment', {
      method: 'POST',
      params,
    });
  }
  export async function downloads(params) {
    return request('/admin/downloadAttachment', {
      params,
    });
  }
  
  export async function searchclass(params) {
    params ={type200:1,...params}
    return request('/admin/searchClass', {
      params,
    });
  }
